home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / ftn / bool.z / bool
Encoding:
Text File  |  1998-10-30  |  11.0 KB  |  199 lines

  1.  
  2.  
  3.  
  4. BBBBOOOOOOOOLLLL((((3333FFFF))))                                                              BBBBOOOOOOOOLLLL((((3333FFFF))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      bool: iand, kiand, and, iior, ior, or, jior, kior, inot, jnot, knot, not,
  10.      iieor, jieor, kieor, ieor, xor, iishft, jishft, kishft, ishft, lshift,
  11.      rshift, iishftc, jishftc, kishftc, ishftc, iibits, jibits, kibits, ibits,
  12.      iibset, jibset, kibset, ibset, bitest, bjtest, bktest, btest, iibclr,
  13.      jibclr, kibclr, ibclr, mvbits - FORTRAN bitwise boolean functions
  14.  
  15. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  16.      iiiinnnntttteeeeggggeeeerrrr iiii,,,, kkkk,,,, llll,,,, mmmm,,,, nnnn,,,, lllleeeennnn
  17.      iiiinnnntttteeeeggggeeeerrrr****2222 iiiiiiii1111,,,, iiiiiiii2222,,,, iiiiiiii3333
  18.      iiiinnnntttteeeeggggeeeerrrr****8888 kkkkkkkk1111,,,, kkkkkkkk2222,,,, kkkkkkkk3333
  19.      llllooooggggiiiiccccaaaallll bbbb
  20.      llllooooggggiiiiccccaaaallll****2222 cccc
  21.      llllooooggggiiiiccccaaaallll****8888 cccccccc
  22.  
  23.      iiii ==== iiiiaaaannnndddd((((mmmm,,,, nnnn))))
  24.      kkkkkkkk3333 ==== kkkkiiiiaaaannnndddd((((kkkkkkkk1111,,,, kkkkkkkk2222))))
  25.      iiii ==== aaaannnndddd((((mmmm,,,, nnnn))))
  26.  
  27.      iiiiiiii3333 ==== iiiiiiiioooorrrr((((iiiiiiii1111,,,, iiiiiiii2222))))
  28.      kkkkkkkk3333 ==== kkkkiiiioooorrrr((((kkkkkkkk1111,,,, kkkkkkkk2222))))
  29.      iiii ==== iiiioooorrrr((((mmmm,,,, nnnn))))
  30.      iiii ==== oooorrrr((((mmmm,,,, nnnn))))
  31.      iiii ==== jjjjiiiioooorrrr((((mmmm,,,, nnnn))))
  32.  
  33.      iiiiiiii3333 ==== iiiinnnnooootttt((((iiiiiiii1111))))
  34.      kkkkkkkk3333 ==== kkkknnnnooootttt((((kkkkkkkk1111))))
  35.      iiii ==== jjjjnnnnooootttt((((mmmm))))
  36.      iiii ==== nnnnooootttt((((mmmm))))
  37.  
  38.      iiiiiiii3333 ==== iiiiiiiieeeeoooorrrr((((iiiiiiii1111,,,, iiiiiiii2222))))
  39.      kkkkkkkk3333 ==== kkkkiiiieeeeoooorrrr((((kkkkkkkk1111,,,, kkkkkkkk2222))))
  40.      iiii ==== jjjjiiiieeeeoooorrrr((((mmmm,,,, nnnn))))
  41.      iiii ==== iiiieeeeoooorrrr((((mmmm,,,, nnnn))))
  42.      iiii ==== xxxxoooorrrr((((mmmm,,,, nnnn))))
  43.  
  44.      iiiiiiii3333 ==== iiiiiiiisssshhhhfffftttt((((iiiiiiii1111,,,, iiiiiiii2222))))
  45.      kkkkkkkk3333 ==== kkkkiiiisssshhhhfffftttt((((kkkkkkkk1111,,,, kkkkkkkk2222))))
  46.      iiii ==== jjjjiiiisssshhhhfffftttt((((mmmm,,,, kkkk))))
  47.      iiii ==== iiiisssshhhhfffftttt((((mmmm,,,, kkkk))))
  48.      iiii ==== llllsssshhhhiiiifffftttt((((mmmm,,,, kkkk))))
  49.      iiii ==== rrrrsssshhhhiiiifffftttt((((mmmm,,,, kkkk))))
  50.  
  51.      iiiiiiii3333 ==== iiiiiiiisssshhhhffffttttcccc((((iiiiiiii1111,,,, iiiiiiii2222,,,, lllleeeennnn))))
  52.      kkkkkkkk3333 ==== kkkkiiiisssshhhhffffttttcccc((((kkkkkkkk1111,,,, kkkkkkkk2222,,,, lllleeeennnn))))
  53.      iiii ==== jjjjiiiisssshhhhffffttttcccc((((mmmm,,,, kkkk,,,, lllleeeennnn))))
  54.      iiii ==== iiiisssshhhhffffttttcccc((((mmmm,,,, kkkk,,,, lllleeeennnn))))
  55.  
  56.      iiiiiiii3333 ==== iiiiiiiibbbbiiiittttssss((((iiiiiiii1111,,,, iiiiiiii2222,,,, lllleeeennnn))))
  57.      kkkkkkkk3333 ==== kkkkiiiibbbbiiiittttssss((((kkkkkkkk1111,,,, kkkkkkkk2222,,,, lllleeeennnn))))
  58.      iiii ==== jjjjiiiibbbbiiiittttssss((((mmmm,,,, kkkk,,,, lllleeeennnn))))
  59.      iiii ==== iiiibbbbiiiittttssss((((mmmm,,,, kkkk,,,, lllleeeennnn))))
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. BBBBOOOOOOOOLLLL((((3333FFFF))))                                                              BBBBOOOOOOOOLLLL((((3333FFFF))))
  71.  
  72.  
  73.  
  74.      iiiiiiii3333 ==== iiiiiiiibbbbsssseeeetttt((((iiiiiiii1111,,,, iiiiiiii2222))))
  75.      kkkkkkkk3333 ==== kkkkiiiibbbbsssseeeetttt((((kkkkkkkk1111,,,, kkkkkkkk2222))))
  76.      iiii ==== jjjjiiiibbbbsssseeeetttt((((nnnn,,,, kkkk))))
  77.      iiii ==== iiiibbbbsssseeeetttt((((nnnn,,,, kkkk))))
  78.  
  79.      cccc ==== bbbbiiiitttteeeesssstttt((((iiiiiiii1111,,,, iiiiiiii2222))))
  80.      cccccccc ==== bbbbkkkktttteeeesssstttt((((kkkkkkkk1111,,,, kkkkkkkk2222))))
  81.      bbbb ==== bbbbjjjjtttteeeesssstttt((((nnnn,,,, kkkk))))
  82.      bbbb ==== bbbbtttteeeesssstttt((((nnnn,,,, kkkk))))
  83.  
  84.      iiiiiiii3333 ==== iiiiiiiibbbbccccllllrrrr((((iiiiiiii1111,,,, iiiiiiii2222))))
  85.      kkkkkkkk3333 ==== kkkkiiiibbbbccccllllrrrr((((kkkkkkkk1111,,,, kkkkkkkk2222))))
  86.      iiii ==== jjjjiiiibbbbccccllllrrrr((((nnnn,,,, kkkk))))
  87.      iiii ==== iiiibbbbccccllllrrrr((((nnnn,,,, kkkk))))
  88.  
  89.      ccccaaaallllllll mmmmvvvvbbbbiiiittttssss((((mmmm,,,, kkkk,,,, lllleeeennnn,,,, nnnn,,,, llll))))
  90.  
  91. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  92.      _b_o_o_l is the general name for the bit field manipulation intrinsic
  93.      functions and subroutines from the FORTRAN Military Standard (MIL-STD-
  94.      1753).
  95.  
  96.      _a_n_d, _o_r and _x_o_r return the value of the binary operations on their
  97.      arguments.  _n_o_t is a unary operator returning the one's complement of its
  98.      argument.  _i_o_r, _i_a_n_d, _n_o_t, _i_e_o_r - return the same results as _a_n_d, _o_r,
  99.      _n_o_t, and _x_o_r.
  100.  
  101.      _l_s_h_i_f_t and _r_s_h_i_f_t return the value of the first argument shifted left or
  102.      right, respectively, the number of times specified by the second
  103.      (integer) argument.  _l_s_h_i_f_t and _r_s_h_i_f_t are implemented as logical shifts,
  104.      in other words, zeros are shifted in.
  105.  
  106.      _i_s_h_f_t, _i_s_h_f_t_c - mmmm specifies the integer to be shifted.  kkkk specifies the
  107.      shift count.  kkkk > 0 indicates a left shift.  kkkk = 0 indicates no shift.  kkkk
  108.      < 0 indicates a right shift.  In _i_s_h_f_t, zeros are shifted in.  In _i_s_h_f_t_c,
  109.      the rightmost lllleeeennnn bits are shifted circularly kkkk bits.  If kkkk is greater
  110.      than the machine word-size, _i_s_h_f_t_c will not shift.
  111.  
  112.      _i_a_n_d, _i_o_r, _n_o_t, _i_e_o_r, and _i_s_h_f_t accept either integer*2 or integer*4
  113.      arguments and the result is the same type.  When one of these intrinsics
  114.      is specified as an _a_r_g_u_m_e_n_t in a subroutine call or function reference,
  115.      the compiler supplies either an integer*2 or integer*4 function depending
  116.      on the ----iiii2222 command line option.
  117.  
  118.      Bit fields are numbered from right to left and the rightmost bit position
  119.      is zero.  The length of the lllleeeennnn field must be greater than zero.
  120.  
  121.      _i_b_i_t_s - extract a subfield of lllleeeennnn bits from mmmm starting with bit position
  122.      kkkk and extending left for lllleeeennnn bits.  The result field is right justified
  123.      and the remaining bits are set to zero.
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. BBBBOOOOOOOOLLLL((((3333FFFF))))                                                              BBBBOOOOOOOOLLLL((((3333FFFF))))
  137.  
  138.  
  139.  
  140.      _b_t_e_s_t - The kkkkth bit of argument nnnn is tested.  The value of the function
  141.      is ....TTTTRRRRUUUUEEEE.... if the bit is a 1 and ....FFFFAAAALLLLSSSSEEEE.... if the bit is 0.
  142.  
  143.      _i_b_s_e_t - the result is the value of nnnn with the kkkkth bit set to 1.
  144.  
  145.      _i_b_c_l_r - the result is the value of nnnn with the kkkkth bit set to 0.
  146.  
  147.      _m_v_b_i_t_s - lllleeeennnn bits are moved beginning at position kkkk of argument mmmm to
  148.      position llll of argument nnnn.
  149.  
  150.  
  151. NNNNOOOOTTTTEEEE
  152.      The rightmost bit is bit position 0.
  153.  
  154. WWWWAAAARRRRNNNNIIIINNNNGGGG
  155.      If the user specifies a shift count larger than or equal to the machine
  156.      word size the result of the shift operation is undefined.  Similarly, bit
  157.      operations which involve bit positions less than 0 or greater than the
  158.      machine word size will have indeterminate results.
  159.  
  160.      Since intrinsic functions promote their arguments to the largest type in
  161.      the argument list, unexpected sign extensions may occur.  For example:
  162.  
  163.      iiiinnnntttteeeeggggeeeerrrr ****1111 mmmm,,,,kkkk,,,,iiii,,,,jjjj
  164.      mmmm====----1111
  165.      kkkk====1111
  166.      iiii====rrrrsssshhhhiiiifffftttt((((mmmm,,,,kkkk))))
  167.      jjjj====rrrrsssshhhhiiiifffftttt((((mmmm,,,,1111))))
  168.  
  169.      The value of i will be 127, a 0 is shifted into bit position 7 of the
  170.      byte.  However the value of j will be -1, both arguments are converted to
  171.      integer, sign extending m, a shift is performed, shifting a 0 into bit
  172.      position 31.  The result is truncated to 8 bits and stored in j.
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.